const defaultState = {
    intl: {
        local: localStorage.getItem('local') || 'zh_CN'
    },
    count: {
        num: 0
    },
    obj: {
        test: undefined
    }
};

export default (state = defaultState, action: any) => {
    const { type, data } = action;
    return {
        ...state,
        [type]: data
    }
};